package com.woniu.command.handler;

import com.woniu.adapter.CustomerAdapter;
import com.woniu.outlet.po.CustomerPo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class CustomerCommandHandler {

    @Autowired
    private CustomerAdapter customerAdapter;



    public Integer addCustomer(CustomerPo customerPo){
        customerAdapter.addCustomerPo(customerPo);
        return 1;
    }

    public Integer updateCustomer(CustomerPo customerPo){
        customerAdapter.updateCustomerPo(customerPo);
        return 1;
    }

    public Integer deleteCustomerById(Long id){
        customerAdapter.deleteCustomerPoById(id);
        return 1;
    }



}
